<%--
  Created by IntelliJ IDEA.
  User: 康娜的小肥腿
  Date: 2020/3/25 0025
  Time: 15:42
--%>
<%@ page import="com.student.dao.StudentDao" %>
<%@ page import="com.student.model.Student" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%-- jsp标准动作(标签)
创建一个JavaBean实例,id属性为此对象的变量名
--%>
<jsp:useBean id="employee" class="com.student.model.Student"/>
<jsp:setProperty name="employee" property="*"/>

<%--
<jsp:setProperty name="employee" property="ename" param="ename"/>
<jsp:setProperty name="employee" property="ename" value="${param.ename}"/>
--%>

<%
    // java脚本
    System.out.println(employee);

    List<Student> list = new StudentDao().select(employee);
    // 将数据存放在request中
    request.setAttribute("employeeList", list);
    // 请求的转发，不能使用重定向
    request.getRequestDispatcher("/1.jsp").forward(request,response);
%>